package com.wsoft.vo;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

/**
 * 管理员登录信息
 *
 * @author: juiet
 * @date: 2024年08月23日 11:30
 */
public class AdminDetails implements UserDetails {
    private final LoginUserDetail loginUser;

    public AdminDetails(LoginUserDetail loginUser) {
        this.loginUser = loginUser;
    }

    public LoginUserDetail getLoginUser() {
        return loginUser;
    }

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public String getPassword() {
        return loginUser.getPassword();
    }

    @Override
    public String getUsername() {
        return loginUser.getUsername();
    }

    @Override
    public boolean isAccountNonExpired() {
        return false;
    }

    @Override
    public boolean isAccountNonLocked() {
        return false;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return false;
    }

    @Override
    public boolean isEnabled() {
        return false;
    }

}
